package TrafficSim;

import junit.framework.TestCase;

public class IntersectionTest extends TestCase {
	Intersection I1;
	Intersection I2;
	Intersection I3;
	Intersection I4;
	Street test;
	Street test1;
	Street test2;
	Street test3;
	Street test4;
	Street test5;
	Street test6;
	
	public IntersectionTest(String name) {
		super(name);
	}

	protected void setUp() throws Exception {
		super.setUp();
		
		I1 = new Intersection(1, -2, 3);
		I2 = new Intersection(2, 0, 0);
		I3 = new Intersection(3, 3, 3);
		I4 = new Intersection(4, -3, -3);

		test1 = new Street(20,"test1");
		test2 = new Street(20,"test2");
		test3 = new Street(20,"test3");
		test4 = new Street(20,"test4");
		test5 = new Street(20,"test5");
		test6 = new Street(20,"test6");
		
		I1.appendStreet(I2, test1);
		I2.appendStreet(I3, test2);
		I2.appendStreet(I4, test3);
		I4.appendStreet(I3, test4);
		I3.appendStreet(I2, test5);
		I2.appendStreet(I1, test6);
	}
	
//	public void testgetStraightOncomingStreet(){
//		Street straight = I1.getStraightOncomingStreet(test1);
//		assertTrue((test5.getEnd() == straight.getEnd()) & (test5.getStart() == straight.getStart()));
//	}
	public void testDirection(){
		System.out.println(I1.getRealDirection(test3, test2));
	}
	

}
